package com.gu.controller.front;

import com.gu.entity.vo.front.CourseDetailVo;
import com.gu.service.EduCourseService;
import entity.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * Description: 课程详情控件
 *
 * @Autor: Rolin
 * datetime: 06-17-14:18
 */
@RestController
@Api(tags = "前台课程详情控件")
@CrossOrigin
@RequestMapping("/eduService")
public class CourseDetailController {

    @Resource
    private EduCourseService eduCourseService ;


    @ApiOperation("前台课程详细介绍")
    @GetMapping("/front/courseDetail/{id}")
    public CommonResult courseDetail(@PathVariable("id")String courseId){
        CourseDetailVo courseDetailVo = eduCourseService.getCourseDetailById(courseId);
        return CommonResult.success().data("courseDetailVo",courseDetailVo);
    }
}
